Search Commands

Monday, February 20, 2023

7:33 AM

Next Unread Page

Starting from the current page, find the next unread page in hierarchical order across all sections and notebooks and navigate to that page.

 

Previous Unread Page

Starting from the current page, find the previous unread page in hierarchical order across all sections and notebooks and navigate to that page.

 

Search

Default shortcut is Shift + Alt + G

The Search dialog provides full-text search using common matching crtieria and, optionally, move or copy selected pages across sections and notebooks or create an index page of selected pages.

 

Note: This is a non-indexed search, meaning  that it will sequentially scan through all pages in the selected scope. Depending on the number of pages and size of each page, this could take a few seconds or it could take a few minutes! Set the scope accordingly.

 

You can match on substrings within words. For example, "search" will match the words "search", "searches", and "searching".

 

Use AND, OR, and NOT operators along with parenthesis to build simple search criteria. For example

 

blue and red or (not green)

 

Strings can also be quoted

 

"blue and red" will match the exact string "blue and red", whereas the previous criteria will match paragraphs containing the string "blue" AND the string "red".

 

Every paragraph matching the criteria will be shown as a clickable hyperlink that, when clicked, will navigate to that paragraph. Once you click a result to navigate to that paragraph, then the next and previous buttons are enabled and clicking them will navigate to the next or previous hit. Those buttons can also be operated by pressing the N and P keys or Down and Up keys respectively.

 

Options

Match case matches the input query string exactly. When using regular expression, it will automatically add or remove the IngoreCase option to the regex.

 

Use regular expressions treats your entire query as a regular expression. No other adjustments to the input text are made. The Search button is only enabled when the regular expression is valid.

 

Search text in table of contents can be enabled to treat the OneMore-generated table of contents as searchable text. This is disabled by default to avoid finding duplicate references on pages.

 

The date selectors apply to the last modified date of each page.

 

Operations

The Index button will create a new page with an index of selected pages.

The Copy button will copy the selected pages to another section or notebook.

The Move button will move the selected pages to another section or notebook.

 

 

Search and Replace

Default shortcut is Ctrl + H

Search the current page for the specified phrase and replace each occurance with a new phrase. Use standard Regular Expression syntax for advanced searches; substitution parameters can be used to inject regular expression captures.

 

Warning

A regular expression with non-greedy syntax could corrupt, delete parts, or erase all content on a page. Be sure to test your regular expression on a single page before targeting a section or notebook.

 

This searches line-by-line so it will not find text that spans paragraphs or table cells. If the text cursor is currently within a word, that word is shown as the default text to replace in the Find what field.

 

 

If the Replace with text contains the sequence \n then that is replaced with a Newline character. For example, replacing text with "one\ntwo" will result in two lines as follows:

 

one
two

 

Due to the way regular expressions are interpreted, if you want to replace 12:33:47 with 12:33 then use a regular expression like ((\d{2}:\d{2}):\d{2}) and replace with $2. If you exclude the outer parenthesis and replace with $1, the result will be no change.

 

 

 

#omwiki #omcommands

 

© 2020 Steven M Cohn. All rights reserved.

Please consider a sponsorship or one-time donation to support ongoing development

 

Created with OneNote.